home *** CD-ROM | disk | FTP | other *** search
- global gQueryField, gOldStart, gMessageHolder, gLastMessage, gResultField
-
- on startMovie
- set the keyDownScript to "checkKey"
- set gQueryField to "mockMessageWindow"
- set gResultField to "resultWindow"
- set the text of cast gQueryField to EMPTY
- set the text of cast gResultField to EMPTY
- set gOldStart to 0
- set gLastMessage to EMPTY
- end
-
- on checkKey
- if the key = RETURN then
- set oldText to field gQueryField
- set scriptToDo to string(chars(field gQueryField, gOldStart, the selEnd))
- set original to scriptToDo
- if scriptToDo contains "put" then
- set scriptToDo to "global gMessageHolder" & RETURN & scriptToDo && "into gMessageHolder"
- end if
- do(string(scriptToDo))
- set tempDump to gMessageHolder & RETURN & field gResultField
- set the text of field gResultField to tempDump
- end if
- end
-
- on SaveGameCheckWindow Data
- put "Output" & RETURN after field gResultField
- if listp(Data) then
- put getaProp(getaProp(Data, #gStates), #curKey) & RETURN after field gResultField
- put getaProp(Data, #dynamicData) & RETURN after field gResultField
- end if
- end
-
- on resizeFields
- set theClicked to the clickOn
- puppetSprite(theClicked, 1)
- repeat while the stillDown
- set mV to the mouseV
- if mV < 44 then
- set mV to 44
- else
- if mV > 172 then
- set mV to 172
- end if
- end if
- set the locV of sprite theClicked to mV
- set the rect of cast "mockMessageWindow" to rect(0, 0, 315, mV)
- set the rect of cast "resultWindow" to rect(0, mV + 5, 315, 210)
- set the locV of sprite 2 to mV
- updateStage()
- end repeat
- end
-
- on charToLine text, charNum
- set soFar to 0
- repeat with x = 1 to the number of lines in text
- set soFar to soFar + length(line x of text) + 1
- if soFar >= charNum then
- exit repeat
- end if
- end repeat
- put x
- end
-